layui.use("element", function () {
  var element = layui.element;
});
layui.use('form', function () {
  var form = layui.form;
  form.on('select(AssetClass)', function (data) {
    var caseD = Number(data.value);
    switch (caseD) {
      case 0:
        window.location.href = "ZCLR.html";
        break;
      case 1:
        window.location.href = "ZCLR_FB.html";
        break;
      case 2:
        window.location.href = "ZCLR_ZQ.html";
        break;
      case 3:
        window.location.href = "ZCLR_TYCK.html";
        break;
      case 4:
        window.location.href = "ZCLR_TYCD.html";
        break;
      case 5:
        window.location.href = "ZCLR_HG.html";
        break;
    }
  });
});

var vm = new Vue({
  el: '#app',
  data: {
    field1: ["资产名称", "是否我行客户", "资产类别（大类）", "资产类别（小类）", '统计类别'],
    field2: ["资产代码", "融资方与额度占用方是否一致", "资产类别（中类）", "资产类别（补充）"],
    field3: ["客户名称", "合同编号", "授信额度申报编号", "组织机构（社会信用）代码", "总行战略客户标识", "是否差别化授权客户", "行业类型代码（门类）", "行业类型代码（中类）", "企业出资人经济成分", "客户信贷政策", "是否属于重点监管行业和领域", "是否城乡一体化"],
    field4: ["客户编号", "批复编号", "行内评级", "重点客户类型", "是否重点授权客户", "四部委标准企业规模等级", "行业类型代码（大类）", "行业类型代码（小类）", "行业信贷政策", "平台类型", "是否两高一剩", "是否保障房"],
    field5: ["是否纳入建行授信体系", "受让标的资产名称", "交易面额（万元）", "发行主体", "实际还款人与融资人是否一致", "实际还款人", "退出方式", "还款方式", "收益方式", "含税收益率（%）", "客户年华融资成本（%）", "承兑机构全称", "异地审查", "纸质合同编号"],
    field6: ["币种", "交易价格（元）", "交易金额（万元）", "额度占用客户名称", "单利/复利", "投资方式", "发行方式", "是否自定义利息", "预期收益率（%）", "不含税收益率（%）", "发放时主要投向", "担保方式", "是否通过一级放款中心审核"],
    AssetClass: 1, //0:请选择  1:非标准化债权类资产 ,2:债券,3:同业存款,4:同业存单,5:回购
    disabled: true,
    ruleForm1: {
      field0: '非标资产A2',
      field1: '1',
      field3: '2',
      field4: '1'
    },
    ruleForm2: {
      field0: 'FB12345678-A2',
      field1: 1,
      field2: 5,
      field3: 1
    },
    ruleForm3: {
      field0: '企业A',
      field1: '',
      field2: '',
      field3: 'A12345678',
      field4: '',
      field5: '',
      field6: 1,
      field7: 1,
      field8: '',
      field9: '',
      field10: 1,
      field11: 1
    },
    ruleForm4: {
      field0: 'A12345678',
      field1: '',
      field2: '',
      field3: '0',
      field4: '',
      field5: '',
      field6: '1',
      field7: '0',
      field8: '审慎支持行业',
      field9: '非政府融资平台客户',
      field10: '1',
      field11: '1'
    },
    ruleForm5: {
      field0: '1',
      field1: '非标资产A2',
      field2: '100,000',
      field3: '',
      field4: '1',
      field5: '企业A',
      field6: '0',
      field7: '',
      field8: '1',
      field9: '',
      field10: '',
      field11: '',
      field12: '',
      field13: ''
    },
    ruleForm6: {
      field0: '1',
      field1: '100',
      field2: '100,000',
      field3: '',
      field4: '1',
      field5: '0',
      field6: '1',
      field7: '2',
      field8: '',
      field9: '',
      field10: '',
      field11: '',
      field12: '1'
    }
  },
  mounted:function(){
    this.init()
  },
  methods: {
    init: function () {
      localStorage.setItem('navigation','<a href="#">首页</a><span lay-separator="">/</span><a href="">大类资产配置模型</a><span lay-separator="">/</span><a><cite>资产录入</cite></a>');
    },
    submitForm: function () {
      layui.use('layer', function () {
        var layer = layui.layer;
        layer.confirm('操作成功！', {
          icon: 1,
          title: '提示',
          btnAlign: 'c',
          shade:false,
          btn: ['继续录入', '查看详情']
        }, function () {
          window.location.href = 'ZCLR.html';
        }, function () {
          window.location.href = 'ZCLR_FB_XQ.html';
        });
      });
    },
    backEdit:function(){
      window.location.href = "ZCLR_FB.html";
    },
    goBack:function(){
      window.location.href = "KTZZCQD.html";  
    }
  }
})